package tech.yangzhijie.basic.knowledge.basic;

public class CachePoolTest {

    public static void main(String[] args) {
        test01();
    }


    /**
     * 测试缓存池
     * Integer的缓存池为-128~127
     */
    private static void test01(){
        Integer num1 = 100;
        Integer num2 = 100;
        System.out.println(num1 == num2);

        Integer num3 = 128;
        Integer num4 = 128;
        System.out.println(num3 == num4);

        Integer num5 = Integer.valueOf(127);
        Integer num6 = Integer.valueOf(127);
        System.out.println(num5 == num6);

        int num7 = 128;
        Integer num8 = 128;
        System.out.println(num7 == num8);
    }
}
